<template>
  <div class="snSuccess">
    <div class="search">
      <div class="mui-input-row">
        <label>扫码区域:</label>
        <div class="search-right">
          <input type="text" placeholder="请输入产品SN" class="search-input" />
          <el-button type="primary">确定</el-button>
        </div>
      </div>
       <el-card shadow="never">
        <ul class="mui-table-view">
          <li class="mui-table-view-cell">
           工单编号
            <span style="color: red;">*</span>
            <span class="content"></span>
          </li>
          <li class="mui-table-view-cell">
            品&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名
            <span style="color: red;">*</span>
            <span class="content"></span>
          </li>
          <li class="mui-table-view-cell">
            品&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号
            <span style="color: red;">*</span>
            <span class="content"></span>
          </li>
           <li class="mui-table-view-cell">
            单&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;位
            <span style="color: red;">*</span>
            <span class="content"></span>
          </li>
           <li class="mui-table-view-cell">
            检验日期
            <span style="color: red;">*</span>
            <span class="content"></span>
          </li>
           <li class="mui-table-view-cell">
            检验人员
            <span style="color: red;">*</span>
            <span class="content"></span>
          </li>

          <li class="mui-table-view-cell" @click="dialogVisible=true">
            <a class="mui-navigate-right">
              总&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;评:
              <span class="content">{{ label }}</span>
            </a>
          </li>
          <li class="mui-table-view-cell" @click="dialogVisible1=true">
            <a class="mui-navigate-right">
              异常类型:
              <span class="content">{{label2}}</span>
            </a>
          </li>

        </ul>
         <textarea cols="10" rows="2" placeholder="备注"></textarea>
       </el-card>
      <div class="btn">
         <mt-button size="large" type="primary" @click="goHandel">提交</mt-button>
   <mt-button size="large" type="default" @click="goBack">返回</mt-button>
      </div>
      
    <el-dialog :visible.sync="dialogVisible" width="90%">
      <mt-radio @change="check" align="right" v-model="value" :options="options"></mt-radio>
    </el-dialog>

    <el-dialog :visible.sync="dialogVisible1" width="90%">
      <mt-radio @change="check1" align="right" v-model="value2" :options="options1"></mt-radio>
    </el-dialog>
  
  
  
  </div>
  </div>
</template>

<script>
import { Toast } from "mint-ui"
export default {
  data() {
    return {
      dialogVisible1:false,
      dialogVisible: false,
      value: "",
      label: "合格",
      value2:'',
      label2:'==请选择==',
     
      options: [{ label: "合格", value: "1" },
      { label: "不合格", value: "2" }],
      options1:[
        {label:'==请选择==',value:'0'},
        {label:'A001',value:'1'},
        {label:'A002',value:'2'},
        {label:'A003',value:'3'},
        {label:'A004',value:'4'},
        {label:'A005',value:'5'},
        {label:'A006',value:'6'},
      ]
      
    };
  },
  methods: {
    check1(){
      this.dialogVisible1 = false
      if(this.value2 === '0'){
        this.label2 = '==请选择=='
      }else if(this.value2 === '1'){
        this.label2 = 'A001'
      }else if(this.value2 === '2'){
        this.label2 = 'A002'
      }else if(this.value2 === '3'){
        this.label2 = 'A003'
      }else if(this.value2 === '4'){
        this.label2 = 'A004'
      }else if(this.value2 === '5'){
        this.label2 = 'A005'
      }else if(this.value2 === '6'){
        this.label2 = 'A006'
      }
    },
    goDeal() {
      this.$router.push({ name: "deal" });
    },
    check() {
        if(this.value === '1'){
					this.label = '合格'
		}else{
            this.label = '不合格'
        }

      this.dialogVisible = false;
    },
    goHandel(){
        if(!this.material){
            Toast("输入材料不能为空！")

        }
    },
    goBack(){
        this.$router.push({ name: "task"})
    }
  }
};
</script>

<style scoped="scoped">
.mint-button--large {
  margin-top: 10px;
}
.btn {
  margin: 0 10px;
}
.search-input {
  padding-left: 0;
  border: none;
  margin-bottom: 0;
  font-size: 16px;
}

.snSuccess .search {
  margin-top: 50px;
}

.mui-input-row {
  background: white;
  
}

.mui-input-row label {
  padding-right: 4px;
  font-size: 16px;
  width: 34%;
}

.snSuccess .el-button {
  padding: 8px 16px;
  margin-bottom: 0px;
  height: 30px;
  margin-top: 5px;
  margin-right: 10px;
}

.snSuccess .search-right {
  display: flex;
  justify-content: space-between;
}
.content {
  margin-left: 50px;
  color: #797575;
  font-size: 16px;
}
textarea{
  border: none;
}
</style>
